import axios from '@/libs/api.request'
import { getToken } from '@/libs/util'
// =============== news-system/advertisements/list.vue =========================
let auth_token = getToken();
//优惠券
export const getTableData = (page_current, page_size, searchData) => {
  return axios.request({
    url: 'api/v1.cuser.car/car_user_index',
    params: {
      page_current: page_current,
      page_size: page_size,
      auth_token:auth_token,
      apply_status :searchData.apply_status,
    },
    method: 'get'
  })
}


export const getInfo = (car_id) => {
  return axios.request({
    url: 'api/v1.cuser.car/apply_read',
    params: {
      car_id: car_id,
      auth_token:auth_token,
    },
    method: 'get'
  })
}

//筛选数据
export const getData = () => {
  return axios.request({
    url: 'api/v1.cuser.car/get_data',
    params: {
      auth_token:auth_token,
    },
    method: 'get'
  })
}

//申请
export const applyCar = (formData) => {
  formData.auth_token = auth_token;
  return axios.request({
    url: 'api/v1.cuser.car/apply',
    data:formData,
    method: 'post'
  })
}



